package net.mingsoft.report_data.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @author gengfa
 * @date 22/06/28
 */
public class YqDatasourceUtil {

    public static final String UNKNOWN_DATASOURCE = "未知";
    private static final Map<String, String> DATASOURCE_MAP = new HashMap<>();
    static {
        DATASOURCE_MAP.put("appdata", "APP");
        DATASOURCE_MAP.put("news_info", "新闻站点");
    }

    private YqDatasourceUtil() {}

    public static String getDatasource(String key) {
        return DATASOURCE_MAP.getOrDefault(key, UNKNOWN_DATASOURCE);
    }
}
